import { Connection } from 'mongoose';

import { DemandSchema } from './demand.schema';
import { DBCONSTANTS } from '../../database/db.constants';

export const DemandProviders = [
  {
    provide: DBCONSTANTS.demandModel,
    useFactory: (connection: Connection) =>
      connection.model('Demand', DemandSchema),
    inject: [DBCONSTANTS.databaseConnection]
  }
];
